home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wics.zip / WICS.H < prev    next >
C/C++ Source or Header  |  1993-03-04  |  36KB  |  927 lines

  1. /*==================================================================================*/
  2. /*                                                                                  */
  3. /*                        W I C S   V e r s i o n   1 . 0 0                            */ 
  4. /*                                                                                  */
  5. /*    Main Header File for the Windows Interface Construction Set (WICS).             */
  6. /*    This header file contains definitions for the WICS custom control library         */
  7. /*    (WICSCC.DLL), the custom dialog box library (WCD.DLL) and the custom classes    */
  8. /*    found in WICS.LIB.                                                                */
  9. /*                                                                                  */
  10. /*    WICS is written to work in conjunction with the Object Windows Libraries (OWL)    */
  11. /*    provided with Borland C++ Version 3.1. As such, this header file is written to  */
  12. /*    be compiled with the Borland C++ complier. If another complier is to be used,    */
  13. /*    some changes in this header file may be neccessary to comply with that            */
  14. /*    complier's syntax requirements.                                                    */
  15. /*                                                                                  */
  16. /*==================================================================================*/
  17.  
  18. /*----------------------------------------------------------------------------------*/
  19. /*    Windows Interface Construction Set - WICS                                        */
  20. /*    Copyright ⌐ 1993, Microdyne Development Technologies                            */
  21. /*    All rights reserved.                                                            */
  22. /*----------------------------------------------------------------------------------*/
  23. /*    Version 1.00        March 1993                                                    */
  24. /*----------------------------------------------------------------------------------*/
  25.                                                                                     
  26. #ifndef _WICS_H                                /*    prevent multiple includes             */
  27. #define _WICS_H
  28.  
  29. #define CM_PRINTERSETUP        24350
  30. #define CM_PRINT            24351
  31.  
  32. #ifndef RC_INVOKED
  33. #include <windows.h>                        /*    Make sure WINDOWS.H is included        */
  34.  
  35. #pragma option -a-                          /*    Assume byte packing throughout         */
  36. #endif                                         /*    !RC_INVOKED                         */
  37.  
  38. #define ERR_INVALID_PATH    100
  39. #define ERR_FILEEXISTS        101
  40. #define ERR_NOFILE            102
  41. #define ERR_OTHER            999
  42.  
  43. /*----------------------------------------------------------------------------------*/
  44. /*                            Button Control Area                                        */
  45. /*                                                                                  */
  46. /*    The following lines pertain to the WICS Button Control. The control can be         */
  47. /*    found in WICSCC.DLL.                                                            */
  48. /*----------------------------------------------------------------------------------*/
  49.  
  50. /*----------------------------------------------------------------------------------*/
  51. /*    Define additional standard Button ID's.  These button IDs coorespond to bitmaps */
  52. /*    in WICSCC.DLL.                                                                     */
  53. /*----------------------------------------------------------------------------------*/
  54.  
  55. #define    IDUNDO            8
  56. #define IDADD            9
  57. #define IDDELETE        10
  58. #define IDEDIT            11
  59. #define IDDONE            12
  60. #define IDRESIZE        13
  61. #define IDEDITPALETTE    14
  62. #define IDAPPLY            15
  63. #define IDFINDNEXT        16
  64. #define IDREPLACE        17
  65. #define IDREPLACEALL    18
  66. #define IDSETUP            19
  67. #define IDOPTIONS        20
  68. #define IDFIND            21
  69.  
  70. #ifndef IDHELP
  71. #define IDHELP            998
  72. #endif
  73.  
  74. /*----------------------------------------------------------------------------------*/
  75. /*    Define standard ID's for the Icon Bar buttons.  These button IDs coorespond to  */
  76. /*    bitmaps in WICSCC.DLL.                                                          */
  77. /*----------------------------------------------------------------------------------*/
  78.  
  79. #define IBID_FILEOPEN    801
  80. #define IBID_FILESAVE    802
  81. #define IBID_SEARCH        803
  82. #define IBID_CUT        804
  83. #define IBID_COPY        805
  84. #define IBID_PASTE        806
  85. #define IBID_PRINTER    807
  86. #define IBID_BOLD        808
  87. #define IBID_ITALIC        809
  88. #define IBID_LEFT        810
  89. #define IBID_CENTER        811
  90. #define IBID_RIGHT        812
  91. #define IBID_PAGE        813
  92. #define IBID_LEFTTAB    814
  93. #define IBID_CENTERTAB    815
  94. #define IBID_RIGHTTAB    816
  95. #define IBID_DECIMALTAB    817
  96. #define IBID_EDIT        818
  97. #define IBID_SUM        819
  98. #define IBID_JUSTIFIED    820
  99. #define IBID_SPELLCHECK    821
  100. #define IBID_ERASE        822
  101. #define IBID_INDENT        823
  102. #define IBID_OUTDENT    824
  103. #define IBID_UNDERLINE    825
  104. #define IBID_BULLET        826
  105. #define IBID_DRAW        827
  106. #define IBID_FRAME        828
  107. #define IBID_CHART        829
  108. #define IBID_MAIL        830
  109. #define IBID_DECIMAL    831
  110. #define IBID_UNDO        832
  111.  
  112. /*----------------------------------------------------------------------------------*/
  113. /*    Define the WICS Button styles...                                                */
  114. /*----------------------------------------------------------------------------------*/
  115.  
  116. #define WBS_PUSHBUTTON      0x00000000L
  117. #define WBS_DEFPUSHBUTTON   0x00000001L
  118. #define WBS_ICONBUTTON        0x00000800L
  119. #define WBS_STATEBUTTON        0x00000400L
  120. #define WBS_REPEATBUTTON    0x00000200L
  121.  
  122. #define WBM_SETBITMAP        WM_USER+100
  123. #define WBM_STOPREPEAT        WM_USER+101
  124. #define WBM_SETCOMMANDCODE    WM_USER+102
  125.  
  126. #define STATE_NORMAL        1
  127. #define STATE_PRESSED        2
  128. #define STATE_HASFOCUS        3
  129.  
  130. /*----------------------------------------------------------------------------------*/
  131. /*    Define notification messages for the X-Y Button Control                            */
  132. /*----------------------------------------------------------------------------------*/
  133.  
  134. #define WXYN_UPPRESSED        100
  135. #define WXYN_RIGHTPRESSED    101
  136. #define WXYN_DOWNPRESSED    102
  137. #define WXYN_LEFTPRESSED    103
  138.  
  139. /*
  140. /*
  141. /************                End of Button Control Section                *************/
  142.  
  143. /*----------------------------------------------------------------------------------*/
  144. /*                        Hierarchial List Box Control Area                           */
  145. /*                                                                                  */
  146. /*    The following lines pertain to the Hierarchial List Box Control. The Hierarchial*/
  147. /*    List Box Control is found in WICSCC.DLL.                                        */
  148. /*----------------------------------------------------------------------------------*/
  149.  
  150. #define HLBS_NOTIFY            0x00000001L
  151. #define HLBS_SORT              0x00000002L
  152. #define HLBS_NOREDRAW          0x00000004L
  153. #define HLBS_MULTIPLESEL       0x00000008L
  154. #define HLBS_OWNERDRAWFIXED    0x00000010L
  155. #define HLBS_OWNERDRAWVARIABLE 0x00000020L
  156. #define HLBS_HASSTRINGS        0x00000040L
  157. #define HLBS_USETABSTOPS       0x00000080L
  158. #define HLBS_NOINTEGRALHEIGHT  0x00000100L
  159. #define HLBS_MULTICOLUMN       0x00000200L
  160. #define HLBS_WANTKEYBOARDINPUT 0x00000400L
  161. #define HLBS_EXTENDEDSEL       0x00000800L
  162. #define HLBS_DISABLENOSCROLL   0x00001000L
  163. #define HLBS_FOLDERBITMAPS       0x00002000L
  164. #define HLBS_STANDARD          (HLBS_NOTIFY | HLBS_SORT | WS_VSCROLL | WS_BORDER)
  165.  
  166. #define HLB_ADDSTRING           (WM_USER+1)
  167. #define HLB_INSERTSTRING        (WM_USER+2)
  168. #define HLB_DELETESTRING        (WM_USER+3)
  169. #define HLB_RESETCONTENT        (WM_USER+5)
  170. #define HLB_SETSEL              (WM_USER+6)
  171. #define HLB_SETCURSEL           (WM_USER+7)
  172. #define HLB_GETSEL              (WM_USER+8)
  173. #define HLB_GETCURSEL           (WM_USER+9)
  174. #define HLB_GETTEXT             (WM_USER+10)
  175. #define HLB_GETTEXTLEN          (WM_USER+11)
  176. #define HLB_GETCOUNT            (WM_USER+12)
  177. #define HLB_SELECTSTRING        (WM_USER+13)
  178. #define HLB_GETTOPINDEX         (WM_USER+15)
  179. #define HLB_FINDSTRING          (WM_USER+16)
  180. #define HLB_GETSELCOUNT         (WM_USER+17)
  181. #define HLB_GETSELITEMS         (WM_USER+18)
  182. #define HLB_GETHORIZONTALEXTENT (WM_USER+20)
  183. #define HLB_SETHORIZONTALEXTENT (WM_USER+21)
  184. #define HLB_SETTOPINDEX         (WM_USER+24)
  185. #define HLB_GETITEMRECT         (WM_USER+25)
  186. #define HLB_GETITEMDATA         (WM_USER+26)
  187. #define HLB_SETITEMDATA         (WM_USER+27)
  188. #define HLB_SELITEMRANGE        (WM_USER+28)
  189. #define HLB_SETITEMHEIGHT       (WM_USER+33)
  190. #define HLB_GETITEMHEIGHT       (WM_USER+34)
  191. #define HLB_FINDSTRINGEXACT     (WM_USER+35)
  192. #define HLB_SETBITMAPS            (WM_USER+36)
  193. #define HLB_DELETESUBTREE        (WM_USER+37)
  194. #define HLB_OPENSUBTREE            (WM_USER+38)
  195. #define HLB_CLOSESUBTREE        (WM_USER+39)
  196. #define HLB_CLOSEALLSUBTREE        (WM_USER+40)
  197. #define HLB_GETCHILDHANDLE        (WM_USER+41)
  198.  
  199. #define HLBN_ERRSPACE        (-2)
  200. #define HLBN_SELCHANGE       1
  201. #define HLBN_DBLCLK          2
  202. #define HLBN_SELCANCEL       3
  203. #define HLBN_SETFOCUS        4
  204. #define HLBN_KILLFOCUS       5
  205. #define HLBN_OPENSUBTREE     6
  206. #define HLBN_CLOSESUBTREE     7
  207.  
  208. #define HLB_OKAY             0
  209. #define HLB_ERR              (-1)
  210. #define HLB_ERRSPACE         (-2)
  211.  
  212. #define HLB_CTLCODE          0L
  213.  
  214. typedef struct tagHIERSEARCH
  215. {
  216.     HANDLE    hSubList;
  217.     int        Index;
  218.     LPSTR    lpszText;
  219. } HIERSEARCH;
  220.  
  221. typedef HIERSEARCH FAR *LPHIERSEARCH;
  222.  
  223. typedef struct tagITEMRECT
  224. {
  225.     HANDLE    hSubList;
  226.     int        Index;
  227.     RECT    rcItem;
  228.     WORD    wLevel;
  229. } ITEMRECT;
  230.  
  231. typedef ITEMRECT FAR *LPITEMRECT;
  232.  
  233. /*    Redefinition of DRAWITEMSTRUCT & MEASUREITEMSTRUCT for the Hierarchial List Box        */
  234.  
  235. typedef struct tagHLBDRAWITEMSTRUCT
  236. {
  237.     UINT    CtlType;
  238.     UINT    CtlID;
  239.     HANDLE    hItemHandle;
  240.     UINT    ItemIndex;
  241.     UINT    wLevel;
  242.     UINT    itemAction;
  243.     UINT    itemState;
  244.     HWND    hwndItem;
  245.     HDC        hDC;
  246.     RECT    rcItem;
  247.     DWORD    itemData;
  248. } HLBDRAWITEMSTRUCT;
  249.  
  250. typedef HLBDRAWITEMSTRUCT FAR *LPHLBDRAWITEMSTRUCT;
  251.  
  252. typedef struct tagHLBMEASUREITEMSTRUCT
  253. {
  254.     UINT    CtlType;
  255.     UINT    CtlID;
  256.     HANDLE    hItemHandle;
  257.     UINT    ItemIndex;
  258.     UINT    wLevel;
  259.     UINT    itemWidth;
  260.     UINT    itemHeight;
  261.     DWORD    itemData;
  262. } HLBMEASUREITEMSTRUCT;
  263.  
  264. typedef HLBMEASUREITEMSTRUCT FAR *LPHLBMEASUREITEMSTRUCT; 
  265.  
  266. /*
  267. /*
  268. /***************        End of Hierarchial List Box Control            *****************/
  269.  
  270. /*----------------------------------------------------------------------------------*/
  271. /*                            Dial Control Area                                        */
  272. /*                                                                                  */
  273. /*    The following lines pertain to the Dial Control. The Dial control is found in     */
  274. /*    WICSCC.DLL.                                                                        */
  275. /*----------------------------------------------------------------------------------*/
  276.  
  277. #ifdef __cplusplus
  278. extern "C" {                            /*    Assume C declarations for C++         */
  279. #endif                                  /*    __cplusplus                         */
  280.  
  281. int  WINAPI GetDialPos (HWND hWnd);
  282. int  WINAPI SetDialPos (HWND hWnd, int nPos, BOOL fRepaint);
  283. void WINAPI GetDialRange (HWND hWnd, int FAR *lpnMin, int FAR *lpnMax);
  284. void WINAPI SetDialRange (HWND hWnd, int nMin, int nMax, BOOL fRedraw);
  285. void WINAPI GetDialTurnRange (HWND hWnd, int FAR *lpnMin, int FAR *lpnMax);
  286. void WINAPI SetDialTurnRange (HWND hWnd, int nMin, int nMax, BOOL fRedraw);
  287.  
  288. #ifdef __cplusplus
  289. }                                       /*    End of extern "C" {                 */
  290. #endif                                  /*    __cplusplus                         */
  291.  
  292. /*
  293. /*
  294. /************                End of Dial Control Section                    *************/
  295.  
  296.  
  297. /*----------------------------------------------------------------------------------*/
  298. /*                            Percent Bar Control Area                                */
  299. /*                                                                                  */
  300. /*    The following lines pertain to the Percent Bar Control. The control is found    */
  301. /*    in the WICSCC.DLL.                                                                */
  302. /*----------------------------------------------------------------------------------*/
  303.  
  304. #define PBM_SETLIMIT            WM_USER
  305. #define PBM_SETBYTESPROCESSED    WM_USER+1
  306.  
  307. /*
  308. /*
  309. /************            End of Percent Bar Control Section                *************/
  310.  
  311.  
  312. /*----------------------------------------------------------------------------------*/
  313. /*                            Font Selection Control Area                                */
  314. /*                                                                                  */
  315. /*    The following lines pertain to the Font Selection Control. The control            */
  316. /*    is found in WICSCC.DLL.                                                            */
  317. /*----------------------------------------------------------------------------------*/
  318.  
  319. #define FSN_CHANGEFONTNAME        0x00000001L
  320. #define FSN_CHANGEFONTSIZE        0x00000002L
  321.  
  322. #define FSM_SETFONTFAMILY        WM_USER+1
  323. #define FSM_SETFONTSIZE            WM_USER+2
  324. #define FSM_GETFONTFAMILY        WM_USER+3
  325. #define FSM_GETFONTSIZE            WM_USER+4
  326. #define FSM_SETFONTCOMMANDCODE    WM_USER+5
  327. #define FSM_SETSIZECOMMANDCODE    WM_USER+6
  328.  
  329. /*----------------------------------------------------------------------------------*/
  330. /*                            Edit Control Area                                        */
  331. /*                                                                                  */
  332. /*    The following lines pertain to the Numeric and Date Edit Controls. The controls    */
  333. /*    are found in WICSCC.DLL.                                                        */
  334. /*----------------------------------------------------------------------------------*/
  335.  
  336. #define NES_NORMAL            0x00000000L
  337. #define NES_LEFT            0x00000000L
  338. #define NES_CENTER          0x00000001L
  339. #define NES_RIGHT           0x00000002L
  340. #define NES_ARROWCONTROLS   0x00000004L
  341. #define NES_FORMATTED       0x00000008L
  342. #define NES_LEDDISPLAY      0x00000010L
  343. #define NES_COUNTERDISPLAY    0x00000020L
  344. #define NES_BORDER            0x00000040L
  345. #define NES_AUTOHSCROLL     0x00000080L
  346. #define NES_NOHIDESEL       0x00000100L
  347. #define NES_READONLY        0x00000800L
  348.  
  349. /*----------------------------------------------------------------------------------*/
  350. /*    Define special messages used by the Numeric Edit Control.                        */
  351. /*----------------------------------------------------------------------------------*/
  352.  
  353. #define NEM_GETSEL              WM_USER+0
  354. #define NEM_SETSEL              WM_USER+1       
  355. #define NEM_GETRECT             WM_USER+2       
  356. #define NEM_GETMODIFY           WM_USER+8
  357. #define NEM_SETMODIFY           WM_USER+9
  358. #define NEM_LINELENGTH          WM_USER+17
  359. #define NEM_REPLACESEL          WM_USER+18
  360. #define NEM_SETFONT             WM_USER+19
  361. #define NEM_GETLINE             WM_USER+20
  362. #define NEM_LIMITTEXT           WM_USER+21
  363. #define NEM_GETFIRSTVISIBLELINE WM_USER+30
  364. #define NEM_SETREADONLY         WM_USER+31
  365. #define NEM_GETEDITPARAMS         WM_USER+135
  366. #define NEM_SETEDITPARAMS        WM_USER+136
  367. #define NEM_GETLASTGOODNUMBER    WM_USER+137
  368. #define NEM_GETINTEGER            WM_USER+138
  369. #define NEM_GETLONGINT            WM_USER+139
  370. #define NEM_GETFLOAT            WM_USER+140
  371. #define NEM_GETDOUBLE            WM_USER+141
  372. #define NEM_GETLONGDOUBLE        WM_USER+142
  373. #define NEM_SETINTEGER            WM_USER+143
  374. #define NEM_SETLONGINT            WM_USER+144
  375. #define NEM_SETFLOAT            WM_USER+145
  376. #define NEM_SETDOUBLE            WM_USER+146
  377. #define NEM_SETLONGDOUBLE        WM_USER+147
  378.  
  379. /*----------------------------------------------------------------------------------*/
  380. /*    Define notification messages returned by the numeric edit control.                */
  381. /*----------------------------------------------------------------------------------*/
  382.  
  383. #define NEN_SETFOCUS             0x0100
  384. #define NEN_KILLFOCUS            0x0200
  385. #define NEN_CHANGE               0x0300
  386. #define NEN_UPDATE               0x0400
  387. #define NEN_ERRSPACE             0x0500
  388. #define NEN_MAXTEXT              0x0501
  389. #define NEN_ERRTOOHIGH            0x0502
  390. #define NEN_ERRTOOLOW            0x0503
  391. #define NEN_HSCROLL              0x0601
  392.  
  393. /*----------------------------------------------------------------------------------*/
  394. /*    Define standard format codes used by the numeric edit control.                    */
  395. /*----------------------------------------------------------------------------------*/
  396.  
  397. #define NEMFT_DEFAULT            0
  398. #define NEMFT_SIMPLEINTEGER        1
  399. #define NEMFT_COMMAINTEGER        2
  400. #define NEMFT_PARENINTEGER        3
  401. #define NEMFT_PARENCOMMAINT        4
  402. #define NEMFT_SIMPLEREAL        5
  403. #define NEMFT_COMMAREAL               6
  404. #define NEMFT_PARENREAL            7
  405. #define NEMFT_PARENCOMMAREAL    8
  406. #define NEMFT_SCIENTIFIC        9
  407.  
  408. /*    Numeric Edit Control parameters. Used by the NEM_SETEDITPARAMS message            */
  409.  
  410. typedef struct tagNECPARMS
  411. {
  412.     WORD        wFormatType;
  413.     BOOL        fLimitValue;
  414.     WORD        wDecimals;
  415.     long double    ldMinimumValue;
  416.     long double    ldMaximumValue;
  417. } NECPARMS;
  418.  
  419. typedef NECPARMS FAR *LPNECPARMS;
  420.  
  421. /*----------------------------------------------------------------------------------*/
  422. /*    Define the Date Edit Control Styles...                                            */
  423. /*----------------------------------------------------------------------------------*/
  424.  
  425. #define DES_NORMAL            0x00000000L
  426. #define DES_CALENDARCONTROL    0x00000004L
  427. #define DES_LEDDISPLAY      0x00000010L
  428. #define DES_COUNTERDISPLAY    0x00000020L
  429. #define DES_BORDER            0x00000040L
  430. #define DES_AUTOHSCROLL        0x00000080L
  431. #define DES_NOHIDESEL        0x00000100L
  432. #define DES_READONLY        0x00000800L
  433.  
  434. /*----------------------------------------------------------------------------------*/
  435. /*    Define special messages used by the Date Edit Control.                            */
  436. /*----------------------------------------------------------------------------------*/
  437.  
  438. #define DEM_GETEDITPARAMS         WM_USER+135
  439. #define DEM_SETEDITPARAMS        WM_USER+136
  440. #define DEM_GETDATE                WM_USER+137
  441. #define DEM_GETMONTH            WM_USER+138
  442. #define DEM_GETDAY                WM_USER+139
  443. #define DEM_GETYEAR                WM_USER+140
  444. #define DEM_SETDATE                WM_USER+143
  445.  
  446. #define CALM_SETDATE            WM_USER+200
  447. #define CALM_GETDATE            WM_USER+201
  448.  
  449. /*----------------------------------------------------------------------------------*/
  450. /*    Define the Time Edit Control Styles...                                            */
  451. /*----------------------------------------------------------------------------------*/
  452.  
  453. #define TES_NORMAL            0x00000000L
  454. #define TES_LEDDISPLAY      0x00000010L
  455. #define TES_COUNTERDISPLAY    0x00000020L
  456. #define TES_BORDER            0x00000040L
  457. #define TES_AUTOHSCROLL        0x00000080L
  458. #define TES_NOHIDESEL        0x00000100L
  459. #define TES_READONLY        0x00000800L
  460.  
  461. /*----------------------------------------------------------------------------------*/
  462. /*    Define special messages used by the Date Edit Control.                            */
  463. /*----------------------------------------------------------------------------------*/
  464.  
  465. #define TEM_GETEDITPARAMS         WM_USER+135
  466. #define TEM_SETEDITPARAMS        WM_USER+136
  467. #define TEM_GETTIME                WM_USER+137
  468. #define TEM_GETHOUR                WM_USER+138
  469. #define TEM_GETMINUTE            WM_USER+139
  470. #define TEM_GETSECOND            WM_USER+140
  471. #define TEM_SETTIME                WM_USER+143
  472.  
  473. #define CLKM_SETTIME            WM_USER+200
  474. #define CLKM_GETTIME            WM_USER+201
  475.  
  476. /*----------------------------------------------------------------------------------*/
  477. /*    Define notification messages returned by the date edit control.                    */
  478. /*----------------------------------------------------------------------------------*/
  479.  
  480. #define DEN_SETFOCUS             0x0100
  481. #define DEN_KILLFOCUS            0x0200
  482. #define DEN_CHANGE               0x0300
  483. #define DEN_UPDATE               0x0400
  484. #define DEN_ERRSPACE             0x0500
  485. #define DEN_MAXTEXT              0x0501
  486. #define DEN_HSCROLL              0x0601
  487.  
  488. #define CALN_CHANGEDATE            0x0100
  489. #define CALN_SELECTDATE            0x0101
  490.  
  491. /*----------------------------------------------------------------------------------*/
  492. /*    Define standard format codes used by the date edit control.                        */
  493. /*----------------------------------------------------------------------------------*/
  494.  
  495. #define DEMFT_DEFAULT            0
  496. #define DEMFT_MMDDYY            0        /*    MM/DD/YY                                */
  497. #define DEMFT_MMDDYYY            1        /*    MM/DD/YYYY                                */
  498. #define DEMFT_MMYYYY            2        /*    MM/YYYY                                    */
  499. #define DEMFT_MMMDDYYYY            3        /*    MMM DD, YYYY                            */
  500. #define DEMFT_MMMMDDYYYY        4        /*    MMMMM DD, YYYY                            */
  501. #define DEMFT_MMMDDYY            5        /*    MMM/DD/YY                                */
  502. #define DEMFT_YYMMDD            6        /*    YYMMDD                                    */
  503. #define DEMFT_MMDDYYNS            7        /*    MMDDYY                                    */
  504.  
  505.  
  506. /*    Numeric Edit Control parameters. Used by the NEM_SETEDITPARAMS message            */
  507.  
  508. typedef struct tagDECPARMS
  509. {
  510.     WORD        wFormatType;
  511.     BOOL        fInitializeDate;
  512.     WORD        InitialYear;
  513.     WORD        InitialMonth;
  514.     WORD        InitialDay;
  515.     WORD        SeperatorCharacter;
  516. } DECPARMS;
  517.  
  518. typedef DECPARMS FAR *LPDECPARMS;
  519.  
  520. typedef struct tagTECPARMS
  521. {
  522.     BOOL        fInitializeTime;
  523.     WORD        InitialHour;
  524.     WORD        InitialMinute;
  525.     WORD        InitialSecond;
  526. } TECPARMS;
  527.  
  528. typedef TECPARMS FAR *LPTECPARMS;
  529.  
  530. /*
  531. /*
  532. /************            End of Numeric Edit Control Section                *************/
  533.  
  534.  
  535. /*----------------------------------------------------------------------------------*/
  536. /*                                                                                  */
  537. /*                            Custom Color Controls Section                            */
  538. /*                                                                                    */
  539. /*    The following section contains definitions for the Color Palette and Color         */
  540. /*    Selection Plate custom controls found in WCD.DLL. These controls were created   */
  541. /*    to provide a "Borland Style" ChooseColor dialog box. These controls can be made */
  542. /*    accessible from the Resource Workshop by installing the WCD.DLL.                */
  543. /*                                                                                  */
  544. /*    To find out how to install custom controls in the Resource Workshop, refer to   */
  545. /*    the documentation that came with your complier.                                    */
  546. /*----------------------------------------------------------------------------------*/
  547.  
  548. /*----------------------------------------------------------------------------------*/
  549. /*    Special messages used by the Color Palette and Color Selection Plate controls.    */
  550. /*----------------------------------------------------------------------------------*/
  551.  
  552. #define WM_SETCOLOR            WM_USER+200
  553. #define WM_SETHUE            WM_USER+201
  554. #define WM_SETSATURATION    WM_USER+202
  555. #define WM_SETLUMINOSITY    WM_USER+203
  556. #define WM_SETINDEX            WM_USER+204
  557. #define WM_SETPALETTE        WM_USER+205
  558. #define WM_GETPALETTESIZE    WM_USER+206
  559. #define WM_GETPALETTE        WM_USER+207
  560. #define WM_GETCOLOR            WM_USER+208
  561. #define WM_GETSELCOLOR        WM_USER+209
  562. #define WM_GETHUE            WM_USER+210
  563. #define WM_GETSATURATION    WM_USER+211
  564. #define    WM_GETLUMINOSITY    WM_USER+212
  565. #define WM_GETINDEX            WM_USER+213
  566. #define WM_ADDCOLOR            WM_USER+214
  567. #define WM_GETSOLIDCOLOR    WM_USER+215
  568.  
  569. /*----------------------------------------------------------------------------------*/
  570. /*    Notification messages sent by the Color Palette Control                            */
  571. /*----------------------------------------------------------------------------------*/
  572.  
  573. #define CPN_SETFOCUS        0x0100
  574. #define CPN_KILLFOCUS        0x0200
  575. #define CPN_CHANGE            0x0300
  576. #define CPN_UPDATE            0x0400
  577.  
  578. /*----------------------------------------------------------------------------------*/
  579. /*    Notification messages sent by the Color Selection Plate Control                    */
  580. /*----------------------------------------------------------------------------------*/
  581.  
  582. #define CSN_SETFOCUS        0x0100
  583. #define CSN_KILLFOCUS        0x0200
  584. #define CSN_CHANGE            0x0300
  585. #define CSN_UPDATE            0x0400
  586. #define CSN_SELCHANGE        0x0500
  587.  
  588. /*----------------------------------------------------------------------------------*/
  589. /*    Notification messages sent by the Color Sample Box Control                        */
  590. /*----------------------------------------------------------------------------------*/
  591.  
  592. #define CSBN_SELSOLID        0x0100
  593.  
  594. #ifdef __cplusplus
  595. extern "C" {                            /*    Assume C declarations for C++         */
  596. #endif                                  /*    __cplusplus                         */
  597.  
  598. COLORREF WINAPI RGBToHSL(COLORREF clrRGB);
  599. COLORREF WINAPI HSLToRGB(COLORREF clrHSL);
  600.  
  601. #ifdef __cplusplus
  602. }                                       /*    End of extern "C" {                 */
  603. #endif                                  /*    __cplusplus                         */
  604.  
  605. /*
  606. /*
  607. /************            End of Custom Color Controls Section            *************/
  608.  
  609.  
  610.  
  611. /*----------------------------------------------------------------------------------*/
  612. /*                        Custom Common Dialog Box Functions                            */
  613. /*                                                                                  */
  614. /*    The following section defines routines that provide a "Borland Style" version   */
  615. /*    of the Microsoft Common Dialog Boxes that are provided with Windows 3.1.         */
  616. /*                                                                                  */
  617. /*    Note: The custom common dialog box functions that follow do not require a copy  */
  618. /*          of COMMDLG.DLL to be installed. These are independent functions from         */
  619. /*          COMMDLG.DLL, however, a copy of BWCC.DLL must be installed for these      */
  620. /*          dialog boxes to work.                                                        */
  621. /*----------------------------------------------------------------------------------*/
  622.  
  623. #ifndef __COMMDLG_H
  624.  
  625. /*--------------------------------------------------------------------------------------*/
  626. /*                                                                                      */
  627. /*    Define Dialog IDs for the common dialogs. This ID is passed in wParam of the help    */
  628. /*    message when the user presses the help button on a common dialog.                   */
  629. /*                                                                                      */
  630. /*--------------------------------------------------------------------------------------*/
  631.  
  632. #define WCDID_OPENFILENAME            1
  633. #define WCDID_SAVEFILENAME            2
  634. #define WCDID_CHOOSECOLOR            3
  635. #define WCDID_CHOOSEFONT            4
  636. #define WCDID_FINDTEXT                5
  637. #define WCDID_REPLACETEXT            6
  638. #define WCDID_PRINTDLG                7
  639. #define WCDID_PRINTSETUP            8
  640.  
  641. typedef struct tagOFN
  642. {
  643.     DWORD       lStructSize;
  644.     HWND        hwndOwner;
  645.     HINSTANCE     hInstance;
  646.     LPCSTR      lpstrFilter;
  647.     LPSTR       lpstrCustomFilter;
  648.     DWORD       nMaxCustFilter;
  649.     DWORD       nFilterIndex;
  650.     LPSTR       lpstrFile;
  651.     DWORD       nMaxFile;
  652.     LPSTR       lpstrFileTitle;
  653.     DWORD       nMaxFileTitle;
  654.     LPCSTR      lpstrInitialDir;
  655.     LPCSTR      lpstrTitle;
  656.     DWORD       Flags;
  657.     UINT        nFileOffset;
  658.     UINT        nFileExtension;
  659.     LPCSTR      lpstrDefExt;
  660.     LPARAM      lCustData;
  661.     UINT       (CALLBACK *lpfnHook)(HWND, UINT, WPARAM, LPARAM);
  662.     LPCSTR      lpTemplateName;
  663. }   OPENFILENAME;
  664.  
  665. typedef OPENFILENAME FAR* LPOPENFILENAME;
  666.  
  667. #define OFN_READONLY                0x00000001
  668. #define OFN_OVERWRITEPROMPT         0x00000002
  669. #define OFN_HIDEREADONLY            0x00000004
  670. #define OFN_NOCHANGEDIR             0x00000008
  671. #define OFN_SHOWHELP                0x00000010
  672. #define OFN_ENABLEHOOK              0x00000020
  673. #define OFN_ENABLETEMPLATE          0x00000040
  674. #define OFN_ENABLETEMPLATEHANDLE    0x00000080
  675. #define OFN_NOVALIDATE              0x00000100
  676. #define OFN_ALLOWMULTISELECT        0x00000200
  677. #define OFN_EXTENSIONDIFFERENT      0x00000400
  678. #define OFN_PATHMUSTEXIST           0x00000800
  679. #define OFN_FILEMUSTEXIST           0x00001000
  680. #define OFN_CREATEPROMPT            0x00002000
  681. #define OFN_SHAREAWARE              0x00004000
  682. #define OFN_NOREADONLYRETURN        0x00008000
  683. #define OFN_NOTESTFILECREATE        0x00010000L
  684.  
  685. #define OFN_SHAREFALLTHROUGH         2
  686. #define OFN_SHARENOWARN              1
  687. #define OFN_SHAREWARN                0
  688.  
  689. typedef struct tagCHOOSECOLOR
  690. {
  691.     DWORD         lStructSize;
  692.     HWND          hwndOwner;
  693.     HWND          hInstance;
  694.     COLORREF       rgbResult;
  695.     COLORREF FAR* lpCustColors;
  696.     DWORD         Flags;
  697.     LPARAM        lCustData;
  698.     UINT         (CALLBACK* lpfnHook)(HWND, UINT, WPARAM, LPARAM);
  699.     LPCSTR        lpTemplateName;
  700. } CHOOSECOLOR;
  701.  
  702. typedef CHOOSECOLOR FAR *LPCHOOSECOLOR;
  703.  
  704. #define CC_RGBINIT               0x00000001
  705. #define CC_FULLOPEN              0x00000002
  706. #define CC_PREVENTFULLOPEN       0x00000004
  707. #define CC_SHOWHELP              0x00000008
  708. #define CC_ENABLEHOOK            0x00000010
  709. #define CC_ENABLETEMPLATE        0x00000020
  710. #define CC_ENABLETEMPLATEHANDLE  0x00000040
  711.  
  712. typedef struct tagFINDREPLACE
  713. {
  714.     DWORD    lStructSize;            /* size of this struct 0x20 */
  715.     HWND     hwndOwner;              /* handle to owner's window */
  716.     HINSTANCE hInstance;             /* instance handle of.EXE that
  717.                                       * contains cust. dlg. template
  718.                                       */
  719.     DWORD    Flags;                  /* one or more of the FR_?? */
  720.     LPSTR    lpstrFindWhat;          /* ptr. to search string    */
  721.     LPSTR    lpstrReplaceWith;       /* ptr. to replace string   */
  722.     UINT     wFindWhatLen;           /* size of find buffer      */
  723.     UINT     wReplaceWithLen;        /* size of replace buffer   */
  724.     LPARAM   lCustData;              /* data passed to hook fn.  */
  725.     UINT    (CALLBACK* lpfnHook)(HWND, UINT, WPARAM, LPARAM);
  726.                                      /* ptr. to hook fn. or NULL */
  727.     LPCSTR   lpTemplateName;         /* custom template name     */
  728. } FINDREPLACE;
  729. typedef FINDREPLACE FAR *LPFINDREPLACE;
  730.  
  731. #define FR_DOWN                         0x00000001L
  732. #define FR_WHOLEWORD                    0x00000002L
  733. #define FR_MATCHCASE                    0x00000004L
  734. #define FR_FINDNEXT                     0x00000008L
  735. #define FR_REPLACE                      0x00000010L
  736. #define FR_REPLACEALL                   0x00000020L
  737. #define FR_DIALOGTERM                   0x00000040L
  738. #define FR_SHOWHELP                     0x00000080L
  739. #define FR_ENABLEHOOK                   0x00000100L
  740. #define FR_ENABLETEMPLATE               0x00000200L
  741. #define FR_NOUPDOWN                     0x00000400L
  742. #define FR_NOMATCHCASE                  0x00000800L
  743. #define FR_NOWHOLEWORD                  0x00001000L
  744. #define FR_ENABLETEMPLATEHANDLE         0x00002000L
  745. #define FR_HIDEUPDOWN                   0x00004000L
  746. #define FR_HIDEMATCHCASE                0x00008000L
  747. #define FR_HIDEWHOLEWORD                0x00010000L
  748.  
  749. typedef struct tagCHOOSEFONT
  750. {
  751.     DWORD           lStructSize;        /* */
  752.     HWND            hwndOwner;          /* caller's window handle   */
  753.     HDC             hDC;                /* printer DC/IC or NULL    */
  754.     LOGFONT FAR*    lpLogFont;          /* ptr. to a LOGFONT struct */
  755.     int             iPointSize;         /* 10 * size in points of selected font */
  756.     DWORD           Flags;              /* enum. type flags         */
  757.     COLORREF        rgbColors;          /* returned text color      */
  758.     LPARAM          lCustData;          /* data passed to hook fn.  */
  759.     UINT (CALLBACK* lpfnHook)(HWND, UINT, WPARAM, LPARAM);
  760.                                         /* ptr. to hook function    */
  761.     LPCSTR          lpTemplateName;     /* custom template name     */
  762.     HINSTANCE       hInstance;          /* instance handle of.EXE that
  763.                                          * contains cust. dlg. template
  764.                                          */
  765.     LPSTR           lpszStyle;          /* return the style field here
  766.                                          * must be LF_FACESIZE or bigger */
  767.     UINT            nFontType;          /* same value reported to the EnumFonts
  768.                                          * call back with the extra FONTTYPE_
  769.                                          * bits added */
  770.     int             nSizeMin;           /* minimum pt size allowed & */
  771.     int             nSizeMax;           /* max pt size allowed if    */
  772.                                         /* CF_LIMITSIZE is used      */
  773. } CHOOSEFONT;
  774. typedef CHOOSEFONT FAR *LPCHOOSEFONT;
  775.  
  776. #define CF_SCREENFONTS               0x00000001
  777. #define CF_PRINTERFONTS              0x00000002
  778. #define CF_BOTH                      (CF_SCREENFONTS | CF_PRINTERFONTS)
  779. #define CF_SHOWHELP                  0x00000004L
  780. #define CF_ENABLEHOOK                0x00000008L
  781. #define CF_ENABLETEMPLATE            0x00000010L
  782. #define CF_ENABLETEMPLATEHANDLE      0x00000020L
  783. #define CF_INITTOLOGFONTSTRUCT       0x00000040L
  784. #define CF_USESTYLE                  0x00000080L
  785. #define CF_EFFECTS                   0x00000100L
  786. #define CF_APPLY                     0x00000200L
  787. #define CF_ANSIONLY                  0x00000400L
  788. #define CF_NOVECTORFONTS             0x00000800L
  789. #define CF_NOOEMFONTS                CF_NOVECTORFONTS
  790. #define CF_NOSIMULATIONS             0x00001000L
  791. #define CF_LIMITSIZE                 0x00002000L
  792. #define CF_FIXEDPITCHONLY            0x00004000L
  793. #define CF_WYSIWYG                   0x00008000L /* must also have CF_SCREENFONTS & CF_PRINTERFONTS */
  794. #define CF_FORCEFONTEXIST            0x00010000L
  795. #define CF_SCALABLEONLY              0x00020000L
  796. #define CF_TTONLY                    0x00040000L
  797. #define CF_NOFACESEL                 0x00080000L
  798. #define CF_NOSTYLESEL                0x00100000L
  799. #define CF_NOSIZESEL                 0x00200000L
  800.  
  801. /* these are extra nFontType bits that are added to what is returned to the
  802.  * EnumFonts callback routine */
  803.  
  804. #define SIMULATED_FONTTYPE      0x8000
  805. #define PRINTER_FONTTYPE        0x4000
  806. #define SCREEN_FONTTYPE         0x2000
  807. #define BOLD_FONTTYPE           0x0100
  808. #define ITALIC_FONTTYPE         0x0200
  809. #define REGULAR_FONTTYPE        0x0400
  810.  
  811. #define WM_CHOOSEFONT_GETLOGFONT        (WM_USER + 1)
  812.  
  813. /* strings used to obtain unique window message for communication
  814.  * between dialog and caller
  815.  */
  816. #define LBSELCHSTRING  "commdlg_LBSelChangedNotify"
  817. #define SHAREVISTRING  "commdlg_ShareViolation"
  818. #define FILEOKSTRING   "commdlg_FileNameOK"
  819. #define COLOROKSTRING  "commdlg_ColorOK"
  820. #define SETRGBSTRING   "commdlg_SetRGBColor"
  821. #define FINDMSGSTRING  "commdlg_FindReplace"
  822. #define HELPMSGSTRING  "commdlg_help"
  823.  
  824. /* HIWORD values for lParam of commdlg_LBSelChangeNotify message */
  825. #define CD_LBSELNOITEMS -1
  826. #define CD_LBSELCHANGE   0
  827. #define CD_LBSELSUB      1
  828. #define CD_LBSELADD      2
  829.  
  830. typedef struct tagPD
  831. {
  832.     DWORD   lStructSize;
  833.     HWND    hwndOwner;
  834.     HGLOBAL hDevMode;
  835.     HGLOBAL hDevNames;
  836.     HDC     hDC;
  837.     DWORD   Flags;
  838.     UINT    nFromPage;
  839.     UINT    nToPage;
  840.     UINT    nMinPage;
  841.     UINT    nMaxPage;
  842.     UINT    nCopies;
  843.     HINSTANCE hInstance;
  844.     LPARAM  lCustData;
  845.     UINT    (CALLBACK* lpfnPrintHook)(HWND, UINT, WPARAM, LPARAM);
  846.     UINT    (CALLBACK* lpfnSetupHook)(HWND, UINT, WPARAM, LPARAM);
  847.     LPCSTR  lpPrintTemplateName;
  848.     LPCSTR  lpSetupTemplateName;
  849.     HGLOBAL hPrintTemplate;
  850.     HGLOBAL hSetupTemplate;
  851. } PRINTDLG;
  852. typedef PRINTDLG  FAR* LPPRINTDLG;
  853.  
  854. #define PD_ALLPAGES                  0x00000000L
  855. #define PD_SELECTION                 0x00000001L
  856. #define PD_PAGENUMS                  0x00000002L
  857. #define PD_NOSELECTION               0x00000004L
  858. #define PD_NOPAGENUMS                0x00000008L
  859. #define PD_COLLATE                   0x00000010L
  860. #define PD_PRINTTOFILE               0x00000020L
  861. #define PD_PRINTSETUP                0x00000040L
  862. #define PD_NOWARNING                 0x00000080L
  863. #define PD_RETURNDC                  0x00000100L
  864. #define PD_RETURNIC                  0x00000200L
  865. #define PD_RETURNDEFAULT             0x00000400L
  866. #define PD_SHOWHELP                  0x00000800L
  867. #define PD_ENABLEPRINTHOOK           0x00001000L
  868. #define PD_ENABLESETUPHOOK           0x00002000L
  869. #define PD_ENABLEPRINTTEMPLATE       0x00004000L
  870. #define PD_ENABLESETUPTEMPLATE       0x00008000L
  871. #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000L
  872. #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000L
  873. #define PD_USEDEVMODECOPIES          0x00040000L
  874. #define PD_DISABLEPRINTTOFILE        0x00080000L
  875. #define PD_HIDEPRINTTOFILE           0x00100000L
  876.  
  877. typedef struct tagDEVNAMES
  878. {
  879.     UINT wDriverOffset;
  880.     UINT wDeviceOffset;
  881.     UINT wOutputOffset;
  882.     UINT wDefault;
  883. } DEVNAMES;
  884. typedef DEVNAMES FAR* LPDEVNAMES;
  885.  
  886. #define DN_DEFAULTPRN                  0x0001
  887.  
  888. #endif                            /*    End of commdlg.h exclusion    */
  889.  
  890. #ifdef __cplusplus
  891. extern "C" {                            /*    Assume C declarations for C++         */
  892. #endif                                  /*    __cplusplus                         */
  893.  
  894. BOOL WINAPI GetOpenFileName(OPENFILENAME FAR*);
  895. BOOL WINAPI GetSaveFileName(OPENFILENAME FAR*);
  896. int  WINAPI GetFileTitle (LPCSTR, LPSTR, UINT);
  897. BOOL WINAPI ChooseColor (CHOOSECOLOR FAR*);
  898. BOOL WINAPI ChooseFont (CHOOSEFONT FAR*);
  899. HWND WINAPI FindText(FINDREPLACE FAR*);
  900. HWND WINAPI ReplaceText(FINDREPLACE FAR*);
  901. BOOL WINAPI PrintDlg(PRINTDLG FAR*);
  902.  
  903. #ifdef __cplusplus
  904. }                                       /*    End of extern "C" {                 */
  905. #endif                                  /*    __cplusplus                         */
  906.  
  907. /*
  908. /*
  909. /************          End of Custom Common Dialog Box Section            *************/
  910.  
  911.  
  912. #ifdef __cplusplus
  913. extern "C" {                            /*    Assume C declarations for C++         */
  914. #endif                                  /*    __cplusplus                         */
  915.  
  916. int FAR PASCAL GetWICSVersion (void);
  917. int FAR PASCAL GetWCDVersion (void);
  918.  
  919. #ifdef __cplusplus
  920. }                                       /*    End of extern "C" {                 */
  921. #endif                                  /*    __cplusplus                         */
  922.  
  923. #ifndef RC_INVOKED
  924. #pragma option -a.                      /*    Revert to default packing            */
  925. #endif                                  /*    !RC_INVOKED                         */
  926. #endif                                    /*    WICS_H                                */
  927.